AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include
AM_CFLAGS = @TARGET_CFLAGS@

# cds的库文件。此处仅仅是为了方便测试文件加载，实际使用的时候需要分别将源码和头文件放到目标工程
# 的对应位置。
noinst_LIBRARIES = libcds.a

libcds_a_SOURCES = \
    @top_srcdir@/src/bintree.c  \
    @top_srcdir@/src/bitmap.c   \
    @top_srcdir@/src/cfifo.c    \
    @top_srcdir@/src/hash_table.c   \
    @top_srcdir@/src/rbtree.c

libcds_a_CFLAGS = $(AM_CFLAGS)

# 测试程序
noinst_PROGRAMS = do_test bintree_test hash_table_test

do_test_SOURCES =   \
    @top_srcdir@/test/test.c    \
    @top_srcdir@/test/list_test.c   \
    @top_srcdir@/test/cfifo_test.c  \
    @top_srcdir@/test/bittool_test.c    \
    @top_srcdir@/test/bitmap_test.c \
    @top_srcdir@/test/bintree_simple_test.c \
    @top_srcdir@/test/rbtree_simple_test.c
do_test_CFLAGS = $(AM_CFLAGS)
do_test_LDADD = libcds.a

bintree_test_SOURCES =  \
    @top_srcdir@/test/bintree_test.c
bintree_test_CFLAGS = $(AM_CFLAGS)
bintree_test_LDADD = libcds.a

hash_table_test_SOURCES = \
    @top_srcdir@/test/hash_table_test.c
hash_table_test_CFLAGS = $(AM_CFLAGS)
hash_table_test_LDADD = libcds.a
